﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductListCtrl.ascx.cs"
    Inherits="MobileShop.Controls.ProductListCtrl" %>
<ul class='menus'>
    <asp:Repeater ID="rpt" runat="server">
        <ItemTemplate>
            <li class='menuitem'>
                <a href='<%# this.ResolveUrl("~/Product.aspx?product=") + MobileShop.Utilities.GetValidParam(Eval("ProductName").ToString()) + "_" + Eval("ID").ToString() %>'>
                    <div class='itemicon' style='height:70px'>
                        <asp:Image Width="64px" ID="Image1" runat="server" AlternateText='<%# Eval("ProductName") %>'
                            ImageUrl='<%# (Eval("Thumbnail") == DBNull.Value || Eval("Thumbnail").ToString() == "") ? GetDefaultPic() : MobileShop.Utilities.GetImageUrl((string)Eval("Thumbnail")) %>' />
                    </div>
                    <div class='itemtitle'>
                        <%# Eval("ProductName") %>
                    </div>
                    <div class='itemPrice'>
                        <%# SessionUser == null || SessionUser.Price ==  POSSystem.BLL.CustomerType.CustomerPrice.SalePrice ? "$" + Eval("SalePrice").ToString() : (SessionUser.Price ==  POSSystem.BLL.CustomerType.CustomerPrice.DealerPrice ? "$" + Eval("DealerPrice").ToString() : "$" + Eval("PartnerPrice").ToString()) %>
                    </div>
                </a>
            </li>
        </ItemTemplate>
    </asp:Repeater>
</ul>
